import { createRouter, createWebHistory } from 'vue-router'
import Login from '../views/Login/Login.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Login
    },
    {
      path: '/HomeView',
      name: 'HomeView',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/HomeView/HomeView.vue'),
      children: [
        {
          path: 'User',
          name: 'User',
          component: () => import('../components/main/Property/PropertyInfo/index.vue')
        },
        {
          path: 'Sourse',
          name: 'Sourse',
          component: () => import('../components/main/Property/PropertyRepair/index.vue')
        },
        {
          path: 'Sourse1',
          name: 'Sourse1',
          component: () => import('../components/main/Property/PropertyDisposal/index.vue')
        }, {
          path: 'Sourse2',
          name: 'Sourse2',
          component: () => import('../components/main/Property/PropertyCirculat/index.vue')
        },
      ]
    },

  ]
})

export default router
